Remove and fix non-spec compliant WebRTC tests Bug: 803494 Change-Id: Ic9efe4adba6909f6af3dbcf90d64debeef216480 Reviewed-on: https://chromium-review.googlesource.com/c/1257786 Reviewed-by: Henrik Boström <hbos@chromium.org> Commit-Queue: Florent Castelli <orphis@chromium.org> Cr-Commit-Position: refs/heads/master@{#596244} 
diff --git a/webrtc/RTCRtpParameters-encodings.html b/webrtc/RTCRtpParameters-encodings.html index b4a60c8..b446dde 100644 --- a/webrtc/RTCRtpParameters-encodings.html +++ b/webrtc/RTCRtpParameters-encodings.html 
@@ -45,15 +45,6 @@  };    dictionary RTCRtpEncodingParameters { - [readonly] - unsigned long ssrc; - - [readonly] - RTCRtpRtxParameters rtx; - - [readonly] - RTCRtpFecParameters fec; -  RTCDtxStatus dtx;  boolean active;  RTCPriorityType priority; @@ -67,16 +58,6 @@  double scaleResolutionDownBy;  };   - dictionary RTCRtpRtxParameters { - [readonly] - unsigned long ssrc; - }; - - dictionary RTCRtpFecParameters { - [readonly] - unsigned long ssrc; - }; -  enum RTCDtxStatus {  "disabled",  "enabled" @@ -229,32 +210,9 @@    param.encodings = undefined;   - return promise_rejects(t, 'InvalidModificationError', + return promise_rejects(t, new TypeError(),  sender.setParameters(param)); - }, `sender.setParameters() with encodings unset should reject with InvalidModificationError`); - - promise_test(async t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const { sender } = pc.addTransceiver('audio'); - await doOfferAnswerExchange(t, pc); - - const param = sender.getParameters(); - validateSenderRtpParameters(param); - const encoding = getFirstEncoding(param); - const { rtx } = encoding; - - if(rtx === undefined) { - encoding.rtx = { ssrc: 2 }; - } else if(rtx.ssrc === undefined) { - rtx.ssrc = 2; - } else { - rtx.ssrc += 1; - } - - return promise_rejects(t, 'InvalidModificationError', - sender.setParameters(param)); - }, `setParameters() with modified encoding.rtx field should reject with InvalidModificationError`); + }, `sender.setParameters() with encodings unset should reject with TypeError`);    promise_test(async t => {  const pc = new RTCPeerConnection(); 
diff --git a/webrtc/RTCRtpParameters-helper.js b/webrtc/RTCRtpParameters-helper.js index 9c4b6cd..c4105de 100644 --- a/webrtc/RTCRtpParameters-helper.js +++ b/webrtc/RTCRtpParameters-helper.js 
@@ -69,11 +69,6 @@  When getParameters is called, the RTCRtpParameters dictionary is constructed  as follows:   - - encodings is populated based on SSRCs and RIDs present in the current remote - description, including SSRCs used for RTX and FEC, if signaled. Every member - of the RTCRtpEncodingParameters dictionaries other than the SSRC and RID fields - is left undefined. -  - The headerExtensions sequence is populated based on the header extensions that  the receiver is currently prepared to receive.   @@ -144,15 +139,6 @@    /*  dictionary RTCRtpEncodingParameters { - [readonly] - unsigned long ssrc; - - [readonly] - RTCRtpRtxParameters rtx; - - [readonly] - RTCRtpFecParameters fec; -  RTCDtxStatus dtx;  boolean active;  RTCPriorityType priority; @@ -166,16 +152,6 @@  double scaleResolutionDownBy;  };   - dictionary RTCRtpRtxParameters { - [readonly] - unsigned long ssrc; - }; - - dictionary RTCRtpFecParameters { - [readonly] - unsigned long ssrc; - }; -  enum RTCDtxStatus {  "disabled",  "enabled" @@ -189,18 +165,6 @@  };  */  function validateEncodingParameters(encoding) { - assert_optional_unsigned_int_field(encoding, 'ssrc'); - - assert_optional_dict_field(encoding, 'rtx'); - if(encoding.rtx) { - assert_unsigned_int_field(encoding.rtx, 'ssrc'); - } - - assert_optional_dict_field(encoding, 'fec'); - if(encoding.fec) { - assert_unsigned_int_field(encoding.fec, 'ssrc'); - } -  assert_optional_enum_field(encoding, 'dtx',  ['disabled', 'enabled']);   
diff --git a/webrtc/RTCRtpReceiver-getParameters.html b/webrtc/RTCRtpReceiver-getParameters.html index 8b6d648..97e5d10 100644 --- a/webrtc/RTCRtpReceiver-getParameters.html +++ b/webrtc/RTCRtpReceiver-getParameters.html 
@@ -22,11 +22,6 @@  When getParameters is called, the RTCRtpParameters dictionary is constructed  as follows:   - - encodings is populated based on SSRCs and RIDs present in the current remote - description, including SSRCs used for RTX and FEC, if signaled. Every member - of the RTCRtpEncodingParameters dictionaries other than the SSRC and RID fields - is left undefined. -  - The headerExtensions sequence is populated based on the header extensions that  the receiver is currently prepared to receive.